# Get the directory name for the executable name
get_filename_component(EXECUTABLE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)

# Find all source files in this directory
file(GLOB_RECURSE SOURCES "*.cpp" "*.cc" "*.c")
file(GLOB_RECURSE HEADERS "*.hpp" "*.h")

# Create executable
add_executable(${EXECUTABLE_NAME} ${SOURCES} ${HEADERS})
add_executable(cpp-make-everything::${EXECUTABLE_NAME} ALIAS ${EXECUTABLE_NAME})

# Set C++ standard
target_compile_features(${EXECUTABLE_NAME} PRIVATE cxx_std_20)

# Add include directories
target_include_directories(${EXECUTABLE_NAME} PRIVATE 
    ${CMAKE_CURRENT_SOURCE_DIR}
)
